package com.base.framework.domain;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Model;

@SuppressWarnings("rawtypes")
public class BaseModel<T extends BaseModel> extends Model<T> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6962218814859552657L;

	/**
	 * 根据ID值删除数据
	 * 
	 * @param clazz
	 * @param primaryKey
	 * @param id
	 * @return
	 */
	protected boolean delete(Class<T> clazz, String primaryKey, Object id) {
		return Db.deleteById(clazz.getName(), primaryKey, id);
	}
}
